import request from '@/utils/request'

// 获取党小组信息
export function getGroups() {
  return request({
    url: '/branch/getAll',
    method: 'GET'
  })
}
// 添加党小组
export function addOneGroup(Group) {
  return request({
    url: '/branch/add',
    method: 'POST',
    params: {
      branchId: Group.branchId,
      branchName: Group.branchName,
      branchType: Group.branchType
    }
  })
}
// 删除党小组
export function deleteOneGroup(id) {
  return request({
    url: '/branch/del',
    method: 'DELETE',
    params: {
      branchId: id
    }
  })
}
// 修改党小组
export function updateOneGroup(Group) {
  return request({
    url: '/branch/update',
    method: 'PUT',
    params: {
      branchId: Group.branchId,
      branchName: Group.branchName,
      branchType: Group.branchType
    }
  })
}
// 根据主键查找党小组
export function getGroupByid(branchId) {
  return request({
    url: '/branch/getByPK',
    method: 'GET',
    params: {
      branchId: branchId
    }
  })
}
